using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CoreManager.Models.Entities
{
    /// <summary>
    /// 角色实体
    /// </summary>
    [Table("sys_role")]
    public class Role : BaseEntity
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        [Required]
        [MaxLength(50)]
        [Column("role_name")]
        public string RoleName { get; set; } = string.Empty;

        /// <summary>
        /// 角色编码
        /// </summary>
        [Required]
        [MaxLength(50)]
        [Column("role_code")]
        public string RoleCode { get; set; } = string.Empty;

        /// <summary>
        /// 排序
        /// </summary>
        [Column("sort")]
        public int Sort { get; set; } = 0;

        /// <summary>
        /// 状态 0:禁用 1:启用
        /// </summary>
        [Column("status")]
        public int Status { get; set; } = 1;

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(500)]
        [Column("remark")]
        public string? Remark { get; set; }
    }
}